import { defineComponent, reactive } from 'vue'
import Draw from './draw'

export default defineComponent({
  methods:{
    getData (): void {
      // this.axios.baseURL = "172.21.13.84:8083"
      this.axios.get("/example/bigscreen").then((resp)=>{
        console.log(resp.data)
      })
    }
  },

  created() {
    this.getData();
  },
  components: {
    Draw
  },
  setup() {
    const cdata = reactive({
      xData: ['行政部', '财政部', '营销部', '运营部', '人力资源部', '客户服务部'],
      seriesData: [
        { value: 10, name: '行政部' },
        { value: 5, name: '财政部' },
        { value: 15, name: '营销部' },
        { value: 25, name: '运营部' },
        { value: 20, name: '人力资源部' },
        { value: 35, name: '客户服务部' }
      ]
    })

    return () => {
      return <div>
        <Draw cdata={cdata} />
      </div>
    }
  },

})
